"""
@author: liujun
@file: test.py
@time: 2022/10/28 18:27
"""

import random
seed ="01"
x=[]
for i in range(11):
    num1 = random.choice(seed)
    x.append(num1)
lamp = "".join(x)
print(lamp)
num2 = random.randint(0,11)
print(num2)
if int(lamp[num2]) == 0:
    print("灯是灭的")
else:
    print("灯是亮的")
usernum = input("请输入身份证号：")
if  usernum.isdigit() and len(usernum) == 18:
    birth = usernum[6:10]
    age = 2022 - int(birth)
    if  0 <= age < 18:
        print("未成年年")
    elif  18 <= age <=50:
        print("青壮年")
    elif age > 50:
        print("老年")
    else:
        print("你还没出生捏")
else:
    print("身份证号不对")